package com.ruoyi.system.feign;

import com.ruoyi.system.feign.model.FeignKnowledgeClassifyModel;
import com.ruoyi.system.feign.model.FeignTenantModel;
import com.ruoyi.system.feign.result.FeignDataResult;
import com.ruoyi.system.feign.result.FeignObjectResult;
import com.ruoyi.system.feign.result.PageHelper;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "knowledgeClassifyServiceClient",
        url = "${service.openai.url}"
)
public interface KnowledgeClassifyServiceClient {


    @PostMapping("/admin/knowledgeClassify/find")
    @Headers({"Content-Type: application/json"})
    FeignDataResult<FeignKnowledgeClassifyModel> find(@RequestBody PageHelper<FeignKnowledgeClassifyModel> pageHelper);

    @PostMapping("/admin/knowledgeClassify/findAll")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<List<FeignKnowledgeClassifyModel>> findAll(@RequestBody FeignKnowledgeClassifyModel search);

    @PostMapping("/admin/knowledgeClassify/save")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeClassifyModel> save(@RequestBody FeignKnowledgeClassifyModel model);

    @GetMapping("/admin/knowledgeClassify/delete/{id}")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<Boolean> delete(@PathVariable(value = "id") String id);

    @PostMapping("/admin/knowledgeClassify/update")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeClassifyModel> update(@RequestBody FeignKnowledgeClassifyModel model);

    @GetMapping("/admin/knowledgeClassify/detail/{id}")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeClassifyModel> detail(@PathVariable(value = "id") String id);

    @GetMapping("/admin/knowledgeClassify/exists")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<Boolean> exists(@RequestBody FeignKnowledgeClassifyModel search);
}
